package demo1.Frames;

import demo1.NiceDemo.picture.PictureView;

import javax.imageio.ImageIO;
import javax.swing.*;
import java.awt.*;
import java.io.File;
import java.io.IOException;

public class LogoTest extends JFrame {
    public LogoTest(String title) {
        super(title);

        JPanel root = new JPanel();
        this.setContentPane(root);

        PictureView picture = new PictureView();
        root.add(picture);
        picture.setPreferredSize(new Dimension(64,64));
        //设置背景色
        picture.setBackgroundColor(Color.GRAY);
        //设置要显示的图片
        try {
            Image image = ImageIO.read(new File("data/logo/Kingsoul.png"));
            picture.setImage(image);
        }catch (IOException e) {
            e.printStackTrace();
        }
    }
}
